<?php 

if ($handle = opendir("templates")) {
	$i = 0;
 while (($file = readdir($handle)) !== false) {
 	//print "Checking $file <br />";
	if(!is_dir($file)){ // This function dosent' work right it seems to 
	//only return true for . and .. so I negated it for now since there should be only directories in here

		$arr_template_dirs [$i] ['keyvalue'] = 'templates/' . $file . '/';
		$arr_template_dirs [$i] ['showvalue'] = 'templates/' .$file . '/';
		$i ++;
	}

 }

}


//column settings for project_id
$fieldspec['project_id'] ['show'] = 1;
$fieldspec['project_id'] ['key'] = 1;
$fieldspec['project_id'] ['size'] = 20;
$fieldspec['project_id'] ['rows'] = 1;

//column settings for project_name
$fieldspec['project_name'] ['show'] = 'E';
$fieldspec['project_name'] ['select'] = 'T';
$fieldspec['project_name'] ['size'] = 20;
$fieldspec['project_name'] ['rows'] = 1;
$fieldspec['project_name'] ['add'] = 1;

//column settings for def_function_page
// NOT USED
//$fieldspec['def_function_page'] ['show'] = 'E';
//$fieldspec['def_function_page'] ['select'] = 'T';
//$fieldspec['def_function_page'] ['size'] = 20;
//$fieldspec['def_function_page'] ['rows'] = 1;

//column settings for project_path
$fieldspec['project_path'] ['show'] = 'E';
$fieldspec['project_path'] ['select'] = 'T';
$fieldspec['project_path'] ['size'] = 20;
$fieldspec['project_path'] ['rows'] = 1;

//column settings for project_server
$fieldspec['project_server'] ['show'] = 'E';
$fieldspec['project_server'] ['select'] = 'T';
$fieldspec['project_server'] ['size'] = 20;
$fieldspec['project_server'] ['rows'] = 1;

//column settings for project_db
$fieldspec['project_db'] ['show'] = 'E';
$fieldspec['project_db'] ['select'] = 'T';
$fieldspec['project_db'] ['size'] = 20;
$fieldspec['project_db'] ['rows'] = 1;

//column settings for project_login
$fieldspec['project_login'] ['show'] = 'E';
$fieldspec['project_login'] ['select'] = 'T';
$fieldspec['project_login'] ['size'] = 20;
$fieldspec['project_login'] ['rows'] = 1;

//column settings for project_pass
$fieldspec['project_pass'] ['show'] = 'E';
$fieldspec['project_pass'] ['select'] = 'T';
$fieldspec['project_pass'] ['size'] = 20;
$fieldspec['project_pass'] ['rows'] = 1;

//column settings for class_subpath
// No need to show
//$fieldspec['class_subpath'] ['show'] = 'E';
//$fieldspec['class_subpath'] ['select'] = 'T';
//$fieldspec['class_subpath'] ['size'] = 20;
//$fieldspec['class_subpath'] ['rows'] = 1;

//column settings db type
$fieldspec['dbtype'] ['show'] = 'E';
$fieldspec['dbtype'] ['select'] = 'T';
$fieldspec['dbtype'] ['size'] = 20;
$fieldspec['dbtype'] ['rows'] = 1;

// column settings for template_dir
$fieldspec['template_dir'] ['show'] = 'E';
$fieldspec['template_dir'] ['list'] = $arr_template_dirs;
$fieldspec['template_dir'] ['select'] = 'D';
$fieldspec['template_dir'] ['size'] = 20;
$fieldspec['template_dir'] ['rows'] = 1;

?>